GtkFileChooser: add a sortable "Type" column
authorNelson Benítez León <nbenitezl@gmail.com>
Thu, 6 Jun 2019 23:02:11 +0000 (19:02 -0400)
committerNelson Benítez León <nbenitezl@gmail.com>
Sat, 22 Jun 2019 17:22:59 +0000 (13:22 -0400)
commitc789a396607a3e2cef84c6dd55f45c566a2a19c7
tree6d455bb8106033d6a9f59e0df0ec948f49cf22f2
parent3c6045e300f9d4ead188c4490f8ef29340a2083c
GtkFileChooser: add a sortable "Type" column

along with a new 'type-format' setting that allows
to choose the output format for the "Type" column.

The options implemented for this setting are:

'mime' : Output from g_content_type_get_mime_type().

'description' : Output from g_content_type_get_description().

'category' : It uses the corresponding generic icon
  of the mime type to group by categories (aka basic types).

  This produces a more compact output than previous options,
  and allows for type families to be grouped together, so eg.
  after sorting by "Type" column, jpeg and png images will
  be placed together, or the various types of archiver files
  will also be grouped together.

  This format was copied from and currently used by Nautilus
  list view, so we also improve consistency with Nautilus.
  Bugzilla entry for Nautilus implementation is:
  https://bugzilla.gnome.org/show_bug.cgi?id=683722

  The list of type families or categories can be checked on:
  https://developer.gnome.org/icon-naming-spec/#mimetypes

  This 'category' format is set as default.

Issue #362
gtk/gtkfilechooserprivate.h
gtk/gtkfilechooserwidget.c
gtk/org.gtk.gtk4.Settings.FileChooser.gschema.xml
gtk/ui/gtkfilechooserwidget.ui